package com.hadoop.util;

import com.hadoop.common.HadoopConstants;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;

import java.io.IOException;

/**
 * <p></p>
 *
 * @author Andy
 * @date 2017/10/14
 */
public class HadoopConnectionUtils {

    public static FileSystem getFileSystem() throws IOException {
        Configuration conf = new Configuration();
        conf.set(HadoopConstants.FS_DEFAULT_NAME, HadoopConstants.FS_DEFAULT_VALUE);
        return FileSystem.get(conf);
    }
}
